<!-- target: surpriseProductForm(master = formPage) -->
<!-- block: crumb -->
    <!-- import: surpriseProductFormCrumb -->
<!-- /block -->
<!-- block: formMain -->
    <!-- import: surpriseProductFormMain -->
<!-- /block -->

<!-- target: surpriseProductFormCrumb(master = crumb) -->
<!-- block: path -->
    <span>商品</span>
    <span><!-- if: ${formType} === 'create' -->新增<!-- else: -->编辑<!-- /if -->商品</span>
<!-- /block -->

<!-- target: surpriseProductFormMain(master = customFormView) -->
<!-- block: sections -->
    <!-- import: surpriseProductBaseContent -->
<!-- /block -->
<!-- block: submitSection -->
<button type="submit" data-ui-type="Button" data-ui-id="submit" data-ui-group="submit" data-ui-variants="warning wide" class="submit-button">确认提交</button>
<!-- /block -->

<!-- target: surpriseProductBaseContent -->
<section class="form-section">

    <div class="ui-form-row">
        <!-- use:
            textboxField(
                field = 'productName',
                title = '商品名称',
                width = 300,
                required = true
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            textboxField(
                field = 'introduction',
                title = '商品介绍', 
                width = 300,
                height = 160,
                mode = 'textarea'
            )
        -->
    </div>

    <!-- if: ${formType} === 'create' -->
    <div class="ui-form-row">
        <!-- use:
            labelSelectorField(
                field = 'surpriseShopId',
                width = 160,
                title = '关联商户',
                options = ${system.surpriseShopList},
                required = true
            )
        -->
    </div>
    <!-- /if -->
    <!-- if: ${formType} === 'update' -->
        <!-- use:
            labelField(text = ${surpriseShopName}, title = '关联商户')
        -->
    <!-- /if -->
    
    <div class="ui-form-row">
        <!-- use:
            textboxField(
                field = 'productUrl',
                title = '购买地址(URL)',
                width = 600,
                required = true
            )
        -->
    </div>
    
    <div class="ui-form-row">
        <!-- use:
            textboxField(
                field = 'amount',
                title = '数量',
                width = 100
            )
        -->
    </div>
    
    <div class="ui-form-row">
        <!-- use:
            uploaderWithPreviewField(
                field = 'pic', title = '商品图片', imageWidth = 250,
                uploadUrl = ${uploadUrl}, 
                descriptions = ['图片大小不超过1M']
            )
        -->
    </div>
</section>
